﻿//----------------------------------------------------------------------------------------------------
// The Visual Game handler holds the active game contents
//----------------------------------------------------------------------------------------------------

package HG.Visual
{
	import flash.display.*;
	import flash.events.*;
	
	import HG.GameService;
	
	public class StateButton extends MovieClip
	{
		[Inspectable]
		public var m_label:String;
		
		//----------------------------------------------------------------------------------------------------
		public function StateButton() 
		{
			stop();
			loaderInfo.addEventListener(Event.INIT, OnInit);
		}
  
 		//----------------------------------------------------------------------------------------------------
		protected function OnInit(e:Event)
		{
			SetText(m_label);
		}
		
		//----------------------------------------------------------------------------------------------------
		public function SetText(string:String)
		{
			if (!string)
				return;
			
			m_label = string;
			this.TXT_Label.htmlText = string;		
		}
	}
}